package com.dtguai.app.base.action;


import com.dtguai.app.common.context.BaseContext;
import com.dtguai.app.model.User;
import com.dtguai.app.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 基础类
 *
 * @author guoLiang
 * @date 2020年4月1日11:03:35
 */
public abstract class BaseAction {

    @Autowired
    private UserService userService;

    protected Integer getUserId() {
        return BaseContext.get();
    }

    protected User getUserInfo() {
        return userService.getUserCacheById(getUserId());
    }

}
